package com.iptech.gxt.widget.core.client.event;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;
import com.google.gwt.event.shared.HandlerRegistration;
import com.iptech.gxt.widget.core.client.event.PinEvent.PinHandler;

public class PinEvent extends GwtEvent<PinHandler> {
	
	private static Type<PinHandler> TYPE = new Type<PinEvent.PinHandler>();
	
	public static Type<PinHandler> getType(){
		return TYPE;
	}
	
	public interface PinHandler extends EventHandler{
		void onPin(PinEvent event);
	}

	@Override
	public com.google.gwt.event.shared.GwtEvent.Type<PinHandler> getAssociatedType() {
		return (Type<PinHandler>)TYPE;
	}

	@Override
	protected void dispatch(PinHandler handler) {
		handler.onPin(this);
		
	}
	
	public interface HasPinHandler{
		 public HandlerRegistration addPinHandler(PinHandler handler);
	}

}
